<template>
	<div class="subscribers">
	  <UserList v-if="subscribers.length!== 0" :userlist="subscribers" />
	  <!-- 分页器 -->
	  <Pagination v-if="totalcount > 0" :total="totalcount" :page-size="48" @handleCurrentChange="handleCurrentChange" />
	  <div class="no" v-if="subscribers.length === 0">
		<el-empty description="暂无收藏者" :image-size="200" />
	  </div>
	</div>
  </template>
  
  <script setup>
  import { ref } from 'vue';
  import UserList from '../../../components/content/userlist/UserList.vue';
  // import Pagination from '../../../components/Pagination.vue'; 
  const subscribers = ref([]);
  const totalcount = ref(0);
  
  const toUserDetail = (uid) => {//接受一个用户 ID（`uid`）作为参数，使用 Vue Router 的 `router.push` 方法导航到用户详情页面，页面路径由用户 ID 动态生成。
	$router.push(`/userdetail/${uid}`);
  };
  
  const handleCurrentChange = (page) => {
	emit('handlePage', page);
  };
  </script>
  
  <style lang="less" scoped>
  .no {
	width: 100%;
	display: flex;
	justify-content: center;
	font-size: 24px;
  }
  </style>